﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;

namespace SharpWeb
{
    /// <summary>
    ///  ToUse:  ControllerBuilder.Current.SetControllerFactory(new SharpControllerFactory());
    /// </summary>
    public class SharpControllerFactory : DefaultControllerFactory
    {
        /// <summary>
        /// 获取控制器类型
        /// </summary>
        /// <param name="requestContext"></param>
        /// <param name="controllerName"></param>
        /// <returns></returns>
        protected override Type GetControllerType(System.Web.Routing.RequestContext requestContext, string controllerName)
        {
            return base.GetControllerType(requestContext, controllerName);
        }

        protected override IController GetControllerInstance(System.Web.Routing.RequestContext requestContext, Type controllerType)
        {
            
            return base.GetControllerInstance(requestContext, controllerType);
        }
    }
}
